<?php
class Util{
  
  static function open_table($id='',$class='box',$style=''){
    echo '<div id="'.$id.'" class="'.$class.'" style="'.$style.'"><div class="ctr">';
  }
  
  static function close_table($class='closebox',$style=''){
    echo '</div></div><div class="'.$class.'" style="'.$style.'"><div class="closebox_left"></div></div>';
  }
  
  static function footer() { 
   echo '<div id="footer"><script language="javascript" type="text/javascript" src="http://adv.helloweb.eu/run/468x60/FFFFFF/FFFFFF/0000FF/000000/008000"></script></div>';
  }
  
  static function fav_icon($fav,$track_id=null){
  	
    if($track_id == null){//we are in playlist mode
      echo '<span id="favicon"></span>';
      return;
    }
  	echo '<a'; if($fav != null) echo ' style="display:none;"';
    echo ' id="favicon_add_'.$track_id.'" href="javascript:mt.track.fav(0,'.$track_id.')"';
    echo ' title="Add song to your playlist"><img src="img/icons/fave.gif" alt="Add" /></a>';
    echo '<a'; if($fav == null) echo ' style="display:none;"';
    echo ' id="favicon_rem_'.$track_id.'" href="javascript:mt.track.fav(1,'.$track_id.')"' .
         ' title="Remove song from your playlist"><img src="img/icons/unfav.png" alt="Remove" /></a>';
  }
}

?>
